from dao.AccountDao import Function
from util.DbUtils import Tool

f = Function()

t = Tool()


class Account(object):
    def __init__(self, uname):
        i = f.check_uname(uname)
        user_list = t.select("select * from userinfo")
        self.name = user_list[i][0]
        self.pwd = user_list[i][1]
        self.balance = user_list[i][2]
